#include <vector> 
#include <unordered_map>    
  
std::vector<int> twoSum(std::vector<int>& nums, int target) {
    std::unordered_map<int, int> hashTable;
    for (int i = 0; i < nums.size(); i++) { 
        int complement = target - nums[i];   
        if (hashTable.count(complement)) {
            return {hashTable[complement], i}; 
        }
        hashTable[nums[i]] = i; 
    }
    return {};   
} 